/* testfiles.c
 *	Simple program to test the file handling system calls
 */

#include "syscall.h"

int index1= -1;
int index2= -1;

void Print(char* str){
  int c = 0;
  while((str[c] != '\n')){
    c++; 
  }
  c++;
  Write(str,c,ConsoleOutput);
	
}

int main() {
  OpenFileId fd;
  int bytesread;
  int i,j,condition;
  char buf[20];


  i = CreateLock(1);
  /*Write("create lock with index ",23, ConsoleOutput);*/
  Print ("created Lock with ID: \n");
  PrintInt(i);
  Acquire(i);
  Write("\n",1,ConsoleOutput);
 
  for(j =0; j<100;j++){
  }

 
  condition = CreateCondition(1);
  Signal(i,condition);
  /*Broadcast(i,condition);*/

  Release(i);

 
  Exit(0);
}
